﻿namespace DL.AI.AIBT
{
    //一直执行直到失败
    public class UntilFail : BTNode
    {
        public UntilFail(string name) : base(name)
        {
        }

        public override Status Process()
        {
            if (Children[0].Process() == Status.Failure)
            {
                Reset();
                return Status.Failure;
            }
            return Status.Running;
        }
    }
}